package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by xiO on 2017/1/17.
 */
@Entity
@Table(name = "cancel_approval_workflow", schema = "live", catalog = "")
public class CancelApprovalWorkflowModel {
    private Integer newId;
    private Integer id;
    private String transcationCode;
    private String step;
    private String quotedPriceCodeOrVin;
    private String flag;
    private String permit;
    private Integer type;
    private String userName;
    private String approvalStatus;
    private String remark;
    private Timestamp processTime;
    private Timestamp cancelTime;
    private String cancelUser;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "new_id")
    public Integer getNewId() {
        return newId;
    }

    public void setNewId(Integer newId) {
        this.newId = newId;
    }

    @Basic
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "transcation_code")
    public String getTranscationCode() {
        return transcationCode;
    }

    public void setTranscationCode(String transcationCode) {
        this.transcationCode = transcationCode;
    }

    @Basic
    @Column(name = "step")
    public String getStep() {
        return step;
    }

    public void setStep(String step) {
        this.step = step;
    }

    @Basic
    @Column(name = "quotedPriceCodeOrVIN")
    public String getQuotedPriceCodeOrVin() {
        return quotedPriceCodeOrVin;
    }

    public void setQuotedPriceCodeOrVin(String quotedPriceCodeOrVin) {
        this.quotedPriceCodeOrVin = quotedPriceCodeOrVin;
    }

    @Basic
    @Column(name = "flag")
    public String getFlag() {
        return flag;
    }

    public void setFlag(String flag) {
        this.flag = flag;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "userName")
    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    @Basic
    @Column(name = "approvalStatus")
    public String getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(String approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "processTime")
    public Timestamp getProcessTime() {
        return processTime;
    }

    public void setProcessTime(Timestamp processTime) {
        this.processTime = processTime;
    }

    @Basic
    @Column(name = "cancelTime")
    public Timestamp getCancelTime() {
        return cancelTime;
    }

    public void setCancelTime(Timestamp cancelTime) {
        this.cancelTime = cancelTime;
    }

    @Basic
    @Column(name = "cancelUser")
    public String getCancelUser() {
        return cancelUser;
    }

    public void setCancelUser(String cancelUser) {
        this.cancelUser = cancelUser;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CancelApprovalWorkflowModel that = (CancelApprovalWorkflowModel) o;

        if (newId != null ? !newId.equals(that.newId) : that.newId != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (transcationCode != null ? !transcationCode.equals(that.transcationCode) : that.transcationCode != null)
            return false;
        if (step != null ? !step.equals(that.step) : that.step != null) return false;
        if (quotedPriceCodeOrVin != null ? !quotedPriceCodeOrVin.equals(that.quotedPriceCodeOrVin) : that.quotedPriceCodeOrVin != null)
            return false;
        if (flag != null ? !flag.equals(that.flag) : that.flag != null) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (userName != null ? !userName.equals(that.userName) : that.userName != null) return false;
        if (approvalStatus != null ? !approvalStatus.equals(that.approvalStatus) : that.approvalStatus != null)
            return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (processTime != null ? !processTime.equals(that.processTime) : that.processTime != null) return false;
        if (cancelTime != null ? !cancelTime.equals(that.cancelTime) : that.cancelTime != null) return false;
        if (cancelUser != null ? !cancelUser.equals(that.cancelUser) : that.cancelUser != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = newId != null ? newId.hashCode() : 0;
        result = 31 * result + (id != null ? id.hashCode() : 0);
        result = 31 * result + (transcationCode != null ? transcationCode.hashCode() : 0);
        result = 31 * result + (step != null ? step.hashCode() : 0);
        result = 31 * result + (quotedPriceCodeOrVin != null ? quotedPriceCodeOrVin.hashCode() : 0);
        result = 31 * result + (flag != null ? flag.hashCode() : 0);
        result = 31 * result + (permit != null ? permit.hashCode() : 0);
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (userName != null ? userName.hashCode() : 0);
        result = 31 * result + (approvalStatus != null ? approvalStatus.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (processTime != null ? processTime.hashCode() : 0);
        result = 31 * result + (cancelTime != null ? cancelTime.hashCode() : 0);
        result = 31 * result + (cancelUser != null ? cancelUser.hashCode() : 0);
        return result;
    }
}
